<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

	<ui:composition template="/faces/manager/xhtml/templates/template.xhtml">
		<ui:define name="manager-content">
			<table id="manager-content-panel" cellpadding="0" cellspacing="1">
				<tr>
					<td id="manager-content-header">
						<h:form>	
							<p:breadCrumb style="width:810px;">
								<p:menuitem value="#{msg['manager.menu.navigator.home']}"/>
								<p:menuitem ajax="false" value="#{msg['manager.menu.navigator.admin']}" action="/faces/manager/xhtml/main.xhtml" />
								<p:menuitem ajax="false"  value="#{msg['manager.menu.navigator.servico']}" action="/faces/manager/xhtml/servico/list.xhtml" />
								<p:menuitem value="#{msg['manager.menu.navigator.servico.create']}" />
							</p:breadCrumb>		
						</h:form>
					</td>
				</tr>
				<tr>
					<td id="manager-content-body">
						<h:form>	
							<p:fieldset legend="#{msg['manager.menu.left.admin.servico.title']}" styleClass="manager-fieldset-content"> 									
								<p:spacer height="20px" />
								<p:focus for="nome" />
								<p:panel>
									<table id="form-create" cellpadding="0" cellspacing="0">							
										<tr>
											<td class="form-column-label">
												<h:outputText value="#{msg['manager.servico.create.nome']}" />:
											</td>
											<td class="form-column-value">
												<p:inputText id="nome" styleClass="inputText" value="#{servicoController.servico.nome}" 
					              					required="true" label="#{msg['manager.servico.create.nome']}">
					              					<f:validateLength minimum="4" maximum="60" />
					              				</p:inputText>
											</td>
											<td class="form-column-error"><p:message for="nome" /></td>
										</tr>
										<tr>
											<td class="form-column-label">
												<h:outputText value="#{msg['manager.servico.create.descricao']}" />:
											</td>
											<td class="form-column-value">
												<p:inputText id="descricao" styleClass="inputText" value="#{servicoController.servico.descricao}" />
											</td>
											<td class="form-column-error">
												
											</td>
										</tr>									
									</table>
								</p:panel>
								<p:spacer height="20px" />
								<table id="panel-buttons" cellpadding="0" cellspacing="0">
									<tr>
										<td>
											<p:commandButton value="#{msg['manager.servico.button.save']}" 
												action="#{servicoController.save}" ajax="false" icon="save-button"></p:commandButton>
										</td>
									</tr>
								</table>
								<p:spacer height="5px" />
							</p:fieldset>
						</h:form>
					</td>
				</tr>
			</table>
		</ui:define>
	</ui:composition>
</html>